package com.xunyun.kotlinwc.main.model
/**
 * @author gl
 * @date 2021/9/10
 * @desc
 */
data class ArticleBean(
    var curPage: Int,
    var datas: List<Article>,
    var offset: Int,
    var over: Boolean = false,
    var pageCount: Int,
    var size: Int,
    var total: Int,
)

data class Article(
    var apkLink: String,
    var audit: Int,
    var author: String,
    var canEdit: Boolean = false,
    var chapterId: Int,
    var chapterName: String,
    var collect: Boolean = false,
    var courseId: Int,
    var desc: String,
    var descMd: String,
    var envelopePic: String,
    var fresh: Boolean,
    var host: String,
    var id: Int,
    var link: String,
    var niceDate: String,
    var niceShareDate: String,
    var origin: String,
    var prefix: String,
    var projectLink: String,
    var publishTime: Long,
    var realSuperChapterId: Int,
    var selfVisible: Int,
    var shareDate: Long,
    var shareUser: String,
    var superChapterId: Int,
    var superChapterName: String,
    var tags: List<Any>,
    var title: String,
    var type: Int,
    var userId: Int,
    var visible: Int,
    var zan: Int,
) {

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as Article

        if (apkLink != other.apkLink) return false
        if (audit != other.audit) return false
        if (author != other.author) return false
        if (canEdit != other.canEdit) return false
        if (chapterId != other.chapterId) return false
        if (chapterName != other.chapterName) return false
        if (collect != other.collect) return false
        if (courseId != other.courseId) return false
        if (desc != other.desc) return false
        if (descMd != other.descMd) return false
        if (envelopePic != other.envelopePic) return false
        if (fresh != other.fresh) return false
        if (host != other.host) return false
        if (id != other.id) return false
        if (link != other.link) return false
        if (niceDate != other.niceDate) return false
        if (niceShareDate != other.niceShareDate) return false
        if (origin != other.origin) return false
        if (prefix != other.prefix) return false
        if (projectLink != other.projectLink) return false
        if (publishTime != other.publishTime) return false
        if (realSuperChapterId != other.realSuperChapterId) return false
        if (selfVisible != other.selfVisible) return false
        if (shareDate != other.shareDate) return false
        if (shareUser != other.shareUser) return false
        if (superChapterId != other.superChapterId) return false
        if (superChapterName != other.superChapterName) return false
        if (tags != other.tags) return false
        if (title != other.title) return false
        if (type != other.type) return false
        if (userId != other.userId) return false
        if (visible != other.visible) return false
        if (zan != other.zan) return false

        return true
    }

    override fun hashCode(): Int {
        var result = apkLink?.hashCode() ?: 0
        result = 31 * result + (audit ?: 0)
        result = 31 * result + (author?.hashCode() ?: 0)
        result = 31 * result + canEdit.hashCode()
        result = 31 * result + (chapterId ?: 0)
        result = 31 * result + (chapterName?.hashCode() ?: 0)
        result = 31 * result + collect.hashCode()
        result = 31 * result + (courseId ?: 0)
        result = 31 * result + (desc?.hashCode() ?: 0)
        result = 31 * result + (descMd?.hashCode() ?: 0)
        result = 31 * result + (envelopePic?.hashCode() ?: 0)
        result = 31 * result + (fresh?.hashCode() ?: 0)
        result = 31 * result + (host?.hashCode() ?: 0)
        result = 31 * result + (id ?: 0)
        result = 31 * result + (link?.hashCode() ?: 0)
        result = 31 * result + (niceDate?.hashCode() ?: 0)
        result = 31 * result + (niceShareDate?.hashCode() ?: 0)
        result = 31 * result + (origin?.hashCode() ?: 0)
        result = 31 * result + (prefix?.hashCode() ?: 0)
        result = 31 * result + (projectLink?.hashCode() ?: 0)
        result = 31 * result + (publishTime?.hashCode() ?: 0)
        result = 31 * result + (realSuperChapterId ?: 0)
        result = 31 * result + (selfVisible ?: 0)
        result = 31 * result + (shareDate?.hashCode() ?: 0)
        result = 31 * result + (shareUser?.hashCode() ?: 0)
        result = 31 * result + (superChapterId ?: 0)
        result = 31 * result + (superChapterName?.hashCode() ?: 0)
        result = 31 * result + (tags?.hashCode() ?: 0)
        result = 31 * result + (title?.hashCode() ?: 0)
        result = 31 * result + (type ?: 0)
        result = 31 * result + (userId ?: 0)
        result = 31 * result + (visible ?: 0)
        result = 31 * result + (zan ?: 0)
        return result
    }


}